package cn.example.vip.mall.search.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * elasticsearch使用的搜索api
 */
@Data
@Document(indexName = "shopsearch-seckillgoodses",type = "seckillgoodses")
public class SeckillGoodsEs {
	@Id
	private String id;
	private String spuId;
	private String skuId;
	@Field(type = FieldType.Text, searchAnalyzer = "ik_smart", analyzer = "ik_smart")
	private String name;
	private String images;
	private Integer price;
	private Double seckillPrice;
	private Date createTime;
	private Integer num;
	private Integer storeCount;
	@Field(type = FieldType.Keyword)
	private String activityId;	// 活动id
}
